package com.link.base.base.weibo.service;

import javax.annotation.Resource;

import com.link.base.base.weibo.dao.mybatis.mapper.WeiboContentMapper;
import com.link.base.base.weibo.model.WeiboContent;
import org.springframework.stereotype.Service;
import com.link.core.basic.dao.mapper.BasicMapper;
import com.link.core.basic.service.BasicServiceImpl;

import java.util.*;

/**
 * @author: 郭闪
 * @date: 2019-02-19
 * @comments:
 */
@Service
public class WeiboContentServiceImpl extends BasicServiceImpl<WeiboContent> implements WeiboContentService {

    @Resource
    private WeiboContentMapper weiboContentMapper;
    @Resource
    private WeiboCommentService commentsService;
    @Resource
    private WeiboUserService userService;

    @Override
    public BasicMapper<WeiboContent> getBasicMapper() {
        return weiboContentMapper;
    }

    @Override
    public List<String> queryExistIds(Set<String> statusIds) {
        return weiboContentMapper.queryExistIds(statusIds);
    }

    @Override
    public void contentsInsert(List<WeiboContent> contents) {
        for (int i = 0; contents != null && i < contents.size(); ++i) {
            weiboContentMapper.insertContent(contents.get(i));
        }

    }

}

